home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 03 Pathfinding with Astar / 01 Matthews / ase / aseView.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-07-04  |  1.6 KB  |  76 lines

  1.  
  2. #ifndef _AFX_ASEVIEW_H_
  3. #define _AFX_ASEVIEW_H_
  4.  
  5. #if _MSC_VER > 1000
  6. #pragma once
  7. #endif
  8.  
  9. #include "pathfinder.h"
  10.  
  11. class CAseView : CView
  12. {
  13. protected:
  14.     CAseView();
  15.     DECLARE_DYNCREATE(CAseView)
  16.  
  17. public:
  18. //    bool    DebugSet() { return (m_cDebug.x != -1); }
  19.     void    HighlightNode(_asNode *, bool);
  20.     void    RemoveHighlight();
  21.  
  22.     CAseDoc *GetDocument();
  23.  
  24.     // Virtual and inline functions
  25.  
  26.     virtual ~CAseView();
  27.     inline void SetBrushType(UINT b) { m_uBrushType = b; }
  28.  
  29.     //{{AFX_VIRTUAL(CAseView)
  30.     public:
  31.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  32.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  33.     protected:
  34.     virtual void OnInitialUpdate(); // called first time after construct
  35.     //}}AFX_VIRTUAL
  36.  
  37. #ifdef _DEBUG
  38.     virtual void AssertValid() const;
  39.     virtual void Dump(CDumpContext& dc) const;
  40. #endif
  41.  
  42. protected:
  43.     bool        m_bDragging;
  44.  
  45.     UINT        m_uBrushType;
  46.  
  47.     CPoint        m_cStart;
  48.     CPoint        m_cEnd;
  49.     CPoint        m_cHilight;
  50.  
  51.     _asNode *    m_cHilightNode;
  52.  
  53.     void        DrawRectangle(int, int, CDC *, COLORREF);
  54.     void        DrawCircle(int, int, CDC *, COLORREF);
  55.     void        DrawRoute(CDC *);
  56.     void        MouseToPoint(CPoint, UINT);
  57.  
  58.     //{{AFX_MSG(CAseView)
  59.     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  60.     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  61.     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  62.     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  63.     afx_msg void OnRButtonDblClk(UINT nFlags, CPoint point);
  64.     //}}AFX_MSG
  65.     DECLARE_MESSAGE_MAP()
  66. };
  67.  
  68. #ifndef _DEBUG
  69. inline CAseDoc* CAseView::GetDocument()
  70.    { return (CAseDoc*)m_pDocument; }
  71. #endif
  72.  
  73. //{{AFX_INSERT_LOCATION}}
  74.  
  75. #endif
  76.